<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" xmlns:th="http://www.thymleaf.org">
    <title>Title</title>
</head>
<body>
<div class="home-scrolldown">
    <a href="/catalog/Category" class="scroll-icon smoothscroll">Return
        to ${sessionScope.product.categoryId}-></a>
</div>

<div id="Catalog" style="padding: 10px 50px;height: 650px;">

<!--    <h2 >${sessionScope.product.name}</h2>-->

    <table class="table table-hover">
        <tr>
            <th>Item ID</th>
            <th>Product ID</th>
            <th>Description</th>
            <th>List Price</th>
            <th>&nbsp;</th>
        </tr>
        <tr th:each="itemlist:${itemList}">
            <td ><a th:href="@{/item/viewItem(itemId=${itemlist.itemId})}" th:text="${itemlist.itemId}">itemid </a>
            </td>
            <td th:text="${itemlist.productId}">productid</td>
            <td th:text="${itemlist.attribute1}">attribute</td>
            <td th:text="${itemlist.listPrice}">listprice</td>
            <td>-->
                <a class="Button" th:href="@{/addItemToDCart(workingItemId=${itemlist.itemId})}">Add to Cart</a>
            </td>
        </tr>
<!--        <tr th:each="product:${productList}">-->
<!--            <td><a th:href="@{/catalog/viewProduct/{productId}(productId=${product.productId})&{categoryId}(categoryId=${category.categoryId})}"  th:text="${product.productId}">productId</a></td>-->
<!--            <td th:text="${product.name}">product.name</td>-->
<!--        </tr>-->
<!--        <c:forEach var="item" items="${sessionScope.itemList}">-->
<!--            <tr>-->
<!--                <td>-->
<!--                    <a href="/View/viewItem?itemId=${item.itemId}">${item.itemId}</a>-->
<!--                </td>-->
<!--                <td>-->
<!--                    ${item.product.productId}-->
<!--                </td>-->
<!--                <td>-->
<!--                    ${item.attribute1} ${item.attribute2} ${item.attribute3}-->
<!--                    ${item.attribute4} ${item.attribute5} ${sessionScope.product.name}-->
<!--                </td>-->
<!--                <td>-->
<!--                    <fmt:formatNumber value="${item.listPrice}" pattern="$#,##0.00"/>-->
<!--                </td>-->
<!--                <td>-->
<!--                    <a class="Button" href="addItemToDCart?workingItemId=${item.itemId}">Add to Cart</a>-->
<!--                </td>-->
<!--            </tr>-->
<!--        </c:forEach>-->
    </table>

</div>
</body>
</html>